﻿namespace WebOptimizer.Data.Model
{
	public sealed partial class GenericEntityFacade : global::WebOptimizer.Data.Model.EntityFacadeBase
	{
		#region Public Members

		#region SourceManager

		private global::WebOptimizer.Data.Model.EntityManagers.SourceManager<global::WebOptimizer.Data.ISource, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ISource>> _SourceManager;
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
		public global::WebOptimizer.Data.Model.EntityManagers.SourceManager<global::WebOptimizer.Data.ISource, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ISource>> SourceManager
		{
			get
			{
				if (_SourceManager == null)
				{
					lock (_mutex)
					{
						if (_SourceManager == null)
							_SourceManager = new global::WebOptimizer.Data.Model.EntityManagers.SourceManager<global::WebOptimizer.Data.ISource, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ISource>>(this);
					}
				}
				return _SourceManager;
			}
		}

		#endregion
		#region TaskManager

		private global::WebOptimizer.Data.Model.EntityManagers.TaskManager<global::WebOptimizer.Data.ITask, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ITask>> _TaskManager;
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
		public global::WebOptimizer.Data.Model.EntityManagers.TaskManager<global::WebOptimizer.Data.ITask, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ITask>> TaskManager
		{
			get
			{
				if (_TaskManager == null)
				{
					lock (_mutex)
					{
						if (_TaskManager == null)
							_TaskManager = new global::WebOptimizer.Data.Model.EntityManagers.TaskManager<global::WebOptimizer.Data.ITask, System.Collections.Generic.IEnumerable<global::WebOptimizer.Data.ITask>>(this);
					}
				}
				return _TaskManager;
			}
		}

		#endregion
		
		#endregion
		#region Helper Members

		private static readonly object _mutex = new object();

		#endregion
		#region Constructors

		public GenericEntityFacade(global::WebOptimizer.Data.Model.IResourceManager resourceManager)
			: base(resourceManager)
		{
		}

		#endregion
	}
}